<template>
  <el-popover placement="bottom" width="348" trigger="hover">
    <div>
      <i18n path="customer.remindIcon.tip" class="tips">
        <span 
          place="path" 
          class="tips-text" 
          @click="jumpCustomerRemind"
        >
          {{ $t('common.pageTitle.pageFoundationSetting') }}-{{ $t('common.customer.customerOperation') }}-{{ $t('common.customer.automaticReminderSettings') }}
        </span>
      </i18n>
    </div>
    <i class="iconfont icon-fdn-info" slot="reference"></i>
  </el-popover>
</template>
<script>
import { PageRoutesTypeEnum } from 'pub-bbx-global/pageType/dist/enum/PageRoutesEnum'
import { openAccurateTab } from '@src/util/platform'

export default {
  name: 'remind-icon',
  data() {
    return {};
  },
  methods: {
    // 跳转自动提醒设置页面
    jumpCustomerRemind() {
      let fromId = window.frameElement.getAttribute('id');

      openAccurateTab({
        type: PageRoutesTypeEnum.PageCustomerRemind,
        fromId
      })
    },
  },
};
</script>
<style lang="scss" scoped>
.iconfont {
  line-height: 32px;
  margin-right: 10px;
  &:hover {
    color: $color-primary-light-6;
  }
}
.tips {
  font-size: 14px;
  &-text {
    cursor: pointer;
    color: $color-primary-light-6;
  }
}
</style>